package com.link.common.core;

public record LinkResponse(int code, String message, Object data) {
    public static LinkResponse ok(Object data){
        return new LinkResponse(0,"",data);
    }
    public static LinkResponse error(String message){
        return new LinkResponse(-1,message,null);
    }

    public boolean isSuccess(){
        return code==0;
    }



}
